package com.example.zm_fanjiantao.web.service;


import com.example.zm_fanjiantao.mapper.UserMapper;
import com.example.zm_fanjiantao.web.model.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RestfulUserService {
    @Resource
    private UserMapper userMapper;
    public void save(User user) {
        userMapper.save(user);
    }
    public List<User> userList(){
        return userMapper.userList();
    }

    public void update(User user) {
        userMapper.update(user);
    }

    public void delete(int id) {
        userMapper.delete(id);
    }

    public User findUser(int id) {
        return userMapper.findUser(id);
    }
}
